Skip to content

[DEV] Refactor DatabaseConfig usages in reconcile runtime and tests#2503

Open
BesikiML wants to merge 2 commits into
mainfrom
2417-dev-refactor-databaseconfig-usages
Open

[DEV] Refactor DatabaseConfig usages in reconcile runtime and tests#2503
BesikiML wants to merge 2 commits into
mainfrom
2417-dev-refactor-databaseconfig-usages

Conversation

@BesikiML

Copy link
Copy Markdown
Contributor

Summary

  • Refactored reconcile runtime internals to use SourceConnectionConfig and TargetConnectionConfig instead of DatabaseConfig.
  • Updated Reconciliation, TriggerReconService, and TriggerReconAggregateService to pass source/target connection config objects explicitly.
  • Updated integration tests in reconcile query-builder and aggregate/capture paths to align with the new config model.
  • Removed remaining DatabaseConfig usage from tests/integration/reconcile/test_recon_capture.py.

Backward Compatibility

  • Preserved ReconCapture constructor compatibility for legacy DatabaseConfig-style callers during the migration period.

Validation

  • uv run python -m pytest tests/integration/reconcile/test_recon_capture.py -q
    • 23 skipped
  • uv run python -m pytest tests/integration/reconcile/query_builder/test_execute.py -q
    • 1 passed, 15 skipped
  • uv run python -m pytest tests/integration/reconcile/test_aggregates_reconcile.py -q
    • 4 passed, 2 skipped
  • uv run python -m pytest tests/integration/reconcile/test_aggregates_recon_capture.py -q
    • 1 skipped

Notes

  • uv.lock changes from local environment sync were intentionally excluded from this PR.

Linked issues

Fixed issue : #2417

Tests

  • manually tested
  • added unit tests
  • added integration tests

…onnection configs

Replace DatabaseConfig usage across reconcile runtime paths with SourceConnectionConfig and TargetConnectionConfig, update service wiring and integration tests, and keep ReconCapture backward-compatible for legacy constructor callers during migration.
@BesikiML BesikiML requested a review from a team as a code owner June 11, 2026 20:38
@BesikiML BesikiML linked an issue Jun 11, 2026 that may be closed by this pull request
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 9.37500% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.82%. Comparing base (5af9696) to head (812c6fc).

Files with missing lines Patch % Lines
...abricks/labs/lakebridge/reconcile/recon_capture.py 4.00% 24 Missing ⚠️
...bricks/labs/lakebridge/reconcile/reconciliation.py 16.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2503      +/-   ##
==========================================
- Coverage   67.00%   66.82%   -0.18%     
==========================================
  Files         107      107              
  Lines        9950     9978      +28     
  Branches     1071     1076       +5     
==========================================
+ Hits         6667     6668       +1     
- Misses       3087     3114      +27     
  Partials      196      196              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

❌ 171/172 passed, 6 flaky, 1 failed, 2 skipped, 53m1s total

❌ test_reconcile_aggregate_data_mismatch_and_missing_records: ValueError: uc_connection_name is required for non-databricks sources (dialect=snowflake) (912ms)
ValueError: uc_connection_name is required for non-databricks sources (dialect=snowflake)
[gw0] linux -- Python 3.12.3 /home/runner/work/lakebridge/lakebridge/.venv/bin/python
[gw0] linux -- Python 3.12.3 /home/runner/work/lakebridge/lakebridge/.venv/bin/python

Flaky tests:

  • 🤪 test_installs_and_runs_local_bladebridge (12.176s)
  • 🤪 test_installs_and_runs_pypi_bladebridge (22.174s)
  • 🤪 test_transpiles_informatica_to_sparksql (24.328s)
  • 🤪 test_transpile_teradata_sql_non_interactive[True] (5.762s)
  • 🤪 test_transpile_teradata_sql_non_interactive[False] (5.834s)
  • 🤪 test_transpiles_informatica_to_sparksql_non_interactive[True] (23.101s)

Running from acceptance #4800

@BesikiML BesikiML self-assigned this Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DEV] Refactor DatabaseConfig usages

2 participants